package com.atom.module.author.pojo.entity;

import com.atom.module.common.base.AbstractAuth;
import lombok.*;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;

@Data
@Builder
@EqualsAndHashCode(callSuper = true)
public class Permission extends AbstractAuth implements Serializable, GrantedAuthority {

    // name
    private String name;

    // description
    private String description;

    // value
    private String value;

    // parentId
    private Long parent;

    @Override
    public String getAuthority() {
        return this.value;
    }
}
